package cn.getech.data.development.constant;

import lombok.Getter;

@Getter
public enum RangerDBType {

    COLUMN(0 , "column" ),
    DATABASE(1 , "database" ),
    TABLE(2 , "table" );
    private  int id;
    private  String  name;
    RangerDBType(int id , String  name){
        this.id = id;
        this.name = name;
    }

    public static RangerDBType ObjOf(Integer status) {
        if (status == null) {
            return null;
        } else {
            for (RangerDBType s : RangerDBType.values()) {
                if (s.getId() == status) {
                    return s;
                }
            }
            return null;
        }
    }
}
